package service.song;

import dao.CustomerDAO;
import dao.RecordDuplicateException;
import dao.SongDAO;
import entities.Customer;
import entities.Song;


public class SongServiceInMemory implements SongService {

	public SongServiceInMemory(){
		
	}
	
	public static SongService newInstance(){
		return new SongServiceInMemory();
	}
	
	/**
	 * Finds a customer based on the customer id.
	 * @param userid - user id
	 * @return the instance of the customer
	 */
	public Song findSong(Long product_id){
		SongDAO db = SongDAO.getInstance();
		Song result = null;
		result = db.findSong(product_id);
		return result;
	}
	
	
	/**
	 * Adds a new customer to the system.
	 * @param obj - the customer instance to add
	 */
	
	public void addSong(Song obj) throws RecordDuplicateException{
		SongDAO db = SongDAO.getInstance();	
		db.addSong(obj);
		return;
	}



}
